from .weapon import Weapon
from .config import Config

class Equipment:
    weapon1 = Weapon('none', '', 1.0)
    weapon2 = Weapon('none', '', 1.0)
    none = Weapon('none', '', 1.0)
    switch = 1
    leftPressed = False
    openFlag = True

    @classmethod
    def get_current_weapon(cls):
        if cls.switch == 1:
            return cls.weapon1
        elif cls.switch == 2:
            return cls.weapon2
        return cls.none

    @classmethod
    def recognize_equipment(cls):
        cls.weapon1 = Weapon(Config.w1Name, Config.m1Name, Config.k1)
        cls.weapon2 = Weapon(Config.w2Name, Config.m2Name, Config.k2)
        print(f'武器1：{Config.w1Name}，倍镜：{Config.m1Name}，微调：{Config.k1}')
        print(f'武器2：{Config.w2Name}，倍镜：{Config.m2Name}，微调：{Config.k2}') 